* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f0f2f5;
}

h1 {
  margin: 20px;
  color: #333;
}

.navbar {
  background-color: #409eff;
  color: white;
  padding: 15px 20px;
  display: flex;
  gap: 20px;
}

.nav-link {
  color: white;
  text-decoration: none;
}

.nav-link.router-link-active {
  font-weight: bold;
  text-decoration: underline;
}

.user-list-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header h1 {
  margin: 0;
  color: #333;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.status-controls {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #409eff;
  color: white;
}

.btn-primary:hover {
  background-color: #66b1ff;
}

.btn-success {
  background-color: #67c23a;
  color: white;
}

.btn-success:hover,
.btn-success.active {
  background-color: #85ce61;
}

.btn-danger {
  background-color: #f56c6c;
  color: white;
}

.btn-danger:hover,
.btn-danger.active {
  background-color: #f78989;
}

.btn-edit {
  background-color: #e6a23c;
  color: white;
  margin-right: 8px;
}

.btn-edit:hover {
  background-color: #ebb563;
}

.btn-delete {
  background-color: #f56c6c;
  color: white;
}

.btn-delete:hover {
  background-color: #f78989;
}

.btn-cancel {
  background-color: #909399;
  color: white;
}

.btn-cancel:hover {
  background-color: #a6a9ad;
}

.status-info {
  margin-bottom: 20px;
  padding: 10px;
  background-color: #f5f7fa;
  border-radius: 4px;
}

.status-valid {
  color: #67c23a;
  font-weight: bold;
}

.status-invalid {
  color: #f56c6c;
  font-weight: bold;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #909399;
  background-color: #f5f7fa;
  border-radius: 4px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.user-table thead {
  background-color: #f5f7fa;
}

.user-table th,
.user-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ebeef5;
}

.user-table th {
  font-weight: 600;
  color: #606266;
}

.user-table tbody tr:hover {
  background-color: #f5f7fa;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ebeef5;
}

.modal-header h2 {
  margin: 0;
  color: #303133;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #909399;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  }

.close-btn:hover {
  background-color: #f5f7fa;
  color: #606266;
}

.form {
  padding: 20px;
  }

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #606266;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #409eff;
  }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Products 产品展示样式 */
.products-container {
  padding: 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  row-gap: 30px;
}

.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  background: #fff;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 10px;
}

.product-name {
  font-size: 16px;
  font-weight: bold;
  margin: 10px 0;
  text-transform: capitalize;
}

.product-price {
  color: #ff6b6b;
  font-size: 18px;
  font-weight: bold;
  margin: 8px 0;
}

.description-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.product-description {
  font-size: 14px;
  color: #666;
  margin: 0;
  flex: 1;
  text-align: left;
}

.add-to-cart-btn {
  background-color: #409eff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.add-to-cart-btn:hover {
  background-color: #66b1ff;
}

/* Cart 购物车样式 */
.cart-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.cart-container h1 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #333;
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.empty-cart p {
  font-size: 1.2rem;
  color: #666;
}

.cart-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-item {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.cart-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-info {
  margin-bottom: 15px;
}

.item-name {
  font-size: 1.3rem;
  color: #333;
  margin: 0 0 8px 0;
}

.item-description {
  color: #666;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

.item-details {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  align-items: center;
}

.item-price,
.item-quantity,
.item-subtotal {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.item-price .label,
.item-quantity .label,
.item-subtotal .label {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
}

.item-price .value,
.item-quantity .value,
.item-subtotal .value {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.cart-summary {
  background-color: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  margin-top: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.summary-row.total {
  border-top: 2px solid #ddd;
  margin-top: 10px;
  padding-top: 20px;
}

.summary-label {
  font-size: 1.1rem;
  color: #555;
}

.summary-value {
  font-size: 1.1rem;
  color: #333;
  font-weight: 600;
}

.summary-row.total .summary-label {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
}

.summary-row.total .summary-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e74c3c;
}

@media (max-width: 768px) {
  .item-details {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .cart-summary {
    padding: 20px;
  }
}
